/*创建数据库*/
CREATE DATABASE [test]
ON
PRIMARY
(
  NAME = N'test',
  FILENAME = N'D:\database\test.ndf',
  SIZE = 8MB,
  MAXSIZE = UNLIMITED,
  FILEGROWTH = 64MB
)
LOG ON
(
  NAME = N'test_log',
  FILENAME = N'D:\database\test_log.ldf',
  SIZE = 8MB,
  MAXSIZE = UNLIMITED,
  FILEGROWTH = 64MB
)

/*创建表格*/
USE [DB_704_condition]
GO

CREATE TABLE [dbo].[Power]
(
	id INT PRIMARY KEY IDENTITY,
	name VARCHAR(255) NOT NULL,
	[value] FLOAT NOT NULL,
	conditionId INT
);

CREATE TABLE [dbo].[ConditionRecord]
(
	id INT PRIMARY KEY IDENTITY,
	name VARCHAR(255) NOT NULL,
	startTime 
	endTime  
)

/*
CREATE TABLE [dbo].[Pressure]
(
	id 	INT PRIMARY KEY IDENTITY,
	[value] FLOAT NOT NULL,
	machineId VARCHAR(255),
	testPoint VARACHAR(255),
	sampleTime DateTime,
	conditionId INT
);

CREATE TABLE [dbo].[Temperature]
(
	id INT PRIMARY KEY IDENTITY,
	[value] FLOAT NOT NULL,
	conditionId INT
);

CREATE TABLE [dbo].[Pressure]
(
	id 	INT PRIMARY KEY IDENTITY,
	[value] FLOAT NOT NULL,
	conditionId INT
);

CREATE TABLE [dbo].[Current]
(
	id 	INT PRIMARY KEY IDENTITY,
	[value] FLOAT NOT NULL,
	conditionId INT
);

CREATE TABLE [dbo].[Voltage]
(
	id 	INT PRIMARY KEY IDENTITY,
	[value] FLOAT NOT NULL,
	conditionId INT
);

CREATE TABLE [dbo].[Voltage]
(
	id 	INT PRIMARY KEY IDENTITY,
	[value] FLOAT NOT NULL,
	conditionId INT
);

CREATE TABLE [dbo].[Power]
(
	id INT PRIMARY KEY IDENTITY,
	[value] FLOAT NOT NULL,
	conditionId INT
);

CREATE TABLE [dbo].[ConditionRecord]
(
	id INT PRIMARY KEY IDENTITY,
	name VARCHAR(255) NOT NULL,
	startTime 
	endTime  
)
*/

